package com.eeepay.eeepay_v2.adapter;

import android.content.Context;

import com.eeepay.eeepay_v2.R;
import com.eeepay.eeepay_v2.model.QueryResult;
import com.eeepay.v2_library.adapter.ABBaseAdapter;
import com.eeepay.v2_library.adapter.ABViewHolder;

/**
 * Created by Ching on 2016/3/15.
 */
public class TradeResultAdapter extends ABBaseAdapter<QueryResult> {


    public TradeResultAdapter(Context context) {
        super(context);
    }

    @Override
    public int getLayoutId() {
        return R.layout.item_trade_query_list;
    }

    @Override
    public void convert(ABViewHolder holder, QueryResult result) {
        holder.setRightText(R.id.lrt_trade_time, result.getTradeTime());
        holder.setRightText(R.id.lrt_trade_merchant_name, result.getName());
        holder.setRightText(R.id.lrt_trade_service_name, result.getServiceName());
        holder.setRightText(R.id.lrt_trade_sum, result.getSum());
        holder.setRightText(R.id.lrt_trade_device, result.getDevice());
        holder.setRightText(R.id.lrt_trade_state, result.getState());
    }
}
